package org.hope.service;

import java.util.List;

import org.hope.cordinator.SearchCordinator;
import org.hope.result.Result;
import org.hope.util.HopeLogger;

/**
 * @author Thilanka
 *
 */
public class HopeSmartServiceImpl implements HopeSmartService
{

	private SearchCordinator cordinator;

	@Override
	public void init()
	{
		cordinator = new SearchCordinator();
		cordinator.initMembers();
	}

	@Override
	public List<Result> search( String text )
	{
		HopeLogger.log( "Search for - " + text );
		List<Result> results = cordinator.search( text );

		HopeLogger.log( "--------------- Search Completed --------------- \n" );
		return results;
	}

	public SearchCordinator getCordinator()
	{
		return cordinator;
	}

}
